type token =
  | TokenStr of (string)
  | TokenColon
  | TokenIf
  | TokenFi
  | TokenTo
  | TokenGoto
  | TokenTrue
  | TokenFalse
  | TokenLBr
  | TokenRBr
  | TokenAnd
  | TokenOr
  | TokenNot
  | TokenSkip
  | TokenEof

open Parsing;;
# 4 "parser2.mly"

open Syntax
# 23 "parser2.ml"
let yytransl_const = [|
  258 (* TokenColon *);
  259 (* TokenIf *);
  260 (* TokenFi *);
  261 (* TokenTo *);
  262 (* TokenGoto *);
  263 (* TokenTrue *);
  264 (* TokenFalse *);
  265 (* TokenLBr *);
  266 (* TokenRBr *);
  267 (* TokenAnd *);
  268 (* TokenOr *);
  269 (* TokenNot *);
  270 (* TokenSkip *);
  271 (* TokenEof *);
    0|]

let yytransl_block = [|
  257 (* TokenStr *);
    0|]

let yylhs = "\255\255\
\001\000\002\000\002\000\002\000\002\000\003\000\003\000\003\000\
\004\000\004\000\004\000\004\000\004\000\004\000\004\000\000\000"

let yylen = "\002\000\
\002\000\000\000\003\000\008\000\006\000\000\000\003\000\007\000\
\001\000\001\000\001\000\003\000\003\000\003\000\002\000\002\000"

let yydefred = "\000\000\
\000\000\000\000\000\000\016\000\000\000\000\000\001\000\000\000\
\000\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\011\000\010\000\000\000\000\000\000\000\000\000\005\000\
\000\000\009\000\000\000\015\000\000\000\000\000\000\000\004\000\
\012\000\000\000\013\000\000\000\000\000\008\000"

let yydgoto = "\002\000\
\004\000\005\000\013\000\023\000"

let yysindex = "\001\000\
\004\255\000\000\005\255\000\000\009\255\000\255\000\000\029\255\
\030\255\000\000\033\255\039\255\038\255\030\255\003\255\004\255\
\040\255\000\000\000\000\000\000\012\255\012\255\017\255\000\000\
\004\255\000\000\028\255\000\000\037\255\012\255\012\255\000\000\
\000\000\044\255\000\000\035\255\030\255\000\000"

let yyrindex = "\000\000\
\032\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\045\255\000\000\000\000\000\000\000\000\045\255\000\000\032\255\
\000\000\000\000\000\000\022\255\000\000\000\000\000\000\000\000\
\032\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\025\255\045\255\000\000"

let yygindex = "\000\000\
\000\000\246\255\242\255\243\255"

let yytablesize = 49
let yytable = "\017\000\
\008\000\001\000\009\000\018\000\003\000\024\000\006\000\027\000\
\028\000\019\000\020\000\021\000\018\000\010\000\032\000\022\000\
\035\000\036\000\019\000\026\000\021\000\029\000\038\000\007\000\
\022\000\007\000\009\000\030\000\031\000\014\000\011\000\012\000\
\009\000\009\000\014\000\014\000\014\000\033\000\030\000\031\000\
\015\000\016\000\034\000\025\000\037\000\030\000\002\000\000\000\
\006\000"

let yycheck = "\014\000\
\001\001\001\000\003\001\001\001\001\001\016\000\002\001\021\000\
\022\000\007\001\008\001\009\001\001\001\014\001\025\000\013\001\
\030\000\031\000\007\001\008\001\009\001\005\001\037\000\015\001\
\013\001\004\001\005\001\011\001\012\001\005\001\002\001\002\001\
\011\001\012\001\010\001\003\001\012\001\010\001\011\001\012\001\
\002\001\004\001\006\001\004\001\001\001\011\001\015\001\255\255\
\004\001"

let yynames_const = "\
  TokenColon\000\
  TokenIf\000\
  TokenFi\000\
  TokenTo\000\
  TokenGoto\000\
  TokenTrue\000\
  TokenFalse\000\
  TokenLBr\000\
  TokenRBr\000\
  TokenAnd\000\
  TokenOr\000\
  TokenNot\000\
  TokenSkip\000\
  TokenEof\000\
  "

let yynames_block = "\
  TokenStr\000\
  "

let yyact = [|
  (fun _ -> failwith "parser")
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'states) in
    Obj.repr(
# 38 "parser2.mly"
                                        ( _1 )
# 127 "parser2.ml"
               : Syntax.nba))
; (fun __caml_parser_env ->
    Obj.repr(
# 42 "parser2.mly"
                                                                         ( [] )
# 133 "parser2.ml"
               : 'states))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in
    Obj.repr(
# 44 "parser2.mly"
                                                                       ( [(_1, [(True, "accept_all")])] )
# 140 "parser2.ml"
               : 'states))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 7 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 5 : string) in
    let _6 = (Parsing.peek_val __caml_parser_env 2 : 'translist) in
    let _8 = (Parsing.peek_val __caml_parser_env 0 : 'states) in
    Obj.repr(
# 45 "parser2.mly"
                                                                            ( (_1,_6)::_8 )
# 150 "parser2.ml"
               : 'states))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 5 : string) in
    let _4 = (Parsing.peek_val __caml_parser_env 2 : 'translist) in
    let _6 = (Parsing.peek_val __caml_parser_env 0 : 'states) in
    Obj.repr(
# 46 "parser2.mly"
                                                                         ( (_1,_4)::_6 )
# 159 "parser2.ml"
               : 'states))
; (fun __caml_parser_env ->
    Obj.repr(
# 50 "parser2.mly"
                                                                         ( [] )
# 165 "parser2.ml"
               : 'translist))
; (fun __caml_parser_env ->
    Obj.repr(
# 51 "parser2.mly"
                                                                        ( [] )
# 171 "parser2.ml"
               : 'translist))
; (fun __caml_parser_env ->
    let _3 = (Parsing.peek_val __caml_parser_env 4 : 'gate) in
    let _6 = (Parsing.peek_val __caml_parser_env 1 : string) in
    let _7 = (Parsing.peek_val __caml_parser_env 0 : 'translist) in
    Obj.repr(
# 52 "parser2.mly"
                                                                      ( (_3,_6)::_7 )
# 180 "parser2.ml"
               : 'translist))
; (fun __caml_parser_env ->
    Obj.repr(
# 56 "parser2.mly"
                                        ( False )
# 186 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    Obj.repr(
# 57 "parser2.mly"
                                             ( True )
# 192 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 58 "parser2.mly"
                                        ( Prop _1 )
# 199 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'gate) in
    Obj.repr(
# 59 "parser2.mly"
                                        ( _2 )
# 206 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'gate) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'gate) in
    Obj.repr(
# 60 "parser2.mly"
                            ( And (_1, _3) )
# 214 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'gate) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'gate) in
    Obj.repr(
# 61 "parser2.mly"
                           ( Or (_1, _3) )
# 222 "parser2.ml"
               : 'gate))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'gate) in
    Obj.repr(
# 62 "parser2.mly"
                              ( Not _2 )
# 229 "parser2.ml"
               : 'gate))
(* Entry main *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]
let yytables =
  { Parsing.actions=yyact;
    Parsing.transl_const=yytransl_const;
    Parsing.transl_block=yytransl_block;
    Parsing.lhs=yylhs;
    Parsing.len=yylen;
    Parsing.defred=yydefred;
    Parsing.dgoto=yydgoto;
    Parsing.sindex=yysindex;
    Parsing.rindex=yyrindex;
    Parsing.gindex=yygindex;
    Parsing.tablesize=yytablesize;
    Parsing.table=yytable;
    Parsing.check=yycheck;
    Parsing.error_function=parse_error;
    Parsing.names_const=yynames_const;
    Parsing.names_block=yynames_block }
let main (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 1 lexfun lexbuf : Syntax.nba)
